const userOrderController = require("../controllers/appOrder");
const { checkTokenUser } = require("../middleware/jwt");
module.exports = (app) => {
  app.use("/user/order", checkTokenUser);
  //查
  app.get("/user/order", userOrderController.getAllOrders);
  //下单
  app.post("/user/order", userOrderController.createOrder);
  app.put("/user/order/:id", userOrderController.changeOrderStatus);
  // 根据id查询
  app.get("/user/order/:id", userOrderController.getOrderById);
};
